package myoa.tool

import org.codehaus.groovy.grails.web.util.WebUtils

import javax.servlet.http.HttpServletRequest


class FileTool {
    static File getBaseDir() {
        new File(basePath)
    }

    static String getBasePath() {                   //todo 研究
        HttpServletRequest request = WebUtils.retrieveGrailsWebRequest().getCurrentRequest()
        String basePath = request.getRealPath('/') + 'file-store/'
        return basePath
    }

    static String getBaseUri(){
        '/file-store/'
    }
}
